#define _CRT_SECURE_NO_WARNINGS 1

#include"Stack.h"

void test1()
{
	Stack s;
	StackInit(&s);
	StackPush(&s, 1);
	StackPush(&s, 2);
	StackPush(&s, 3);
	StackPush(&s, 4);
	StackPush(&s, 5);
	while (!StackEmpty(&s))
	{
		printf("%d ", StackTop(&s));
		StackPop(&s);
	}
	StackDestroy(&s);
}


void test2()
{
	Stack s;
	StackInit(&s);
	StackPush(&s, 1);
	printf("%d ", StackTop(&s));
	StackPop(&s);
	StackPush(&s, 2);
	printf("%d ", StackTop(&s));
	StackPop(&s);
	StackPush(&s, 3);
	StackPush(&s, 4);
	StackPush(&s, 5);
	while (!StackEmpty(&s))
	{
		printf("%d ", StackTop(&s));
		StackPop(&s);
		printf("\n");
	}
	printf("%d", StackSize(&s));
	StackDestroy(&s);
}

int main()
{

	//test1();
	test2();
	return 0;
}